package com.cxh.handle;

import com.cxh.exception.SsmException;
import com.cxh.vo.ResultVo;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class SsmExceptionHandler {

    @ExceptionHandler({SsmException.class})
    @ResponseBody
    public ResultVo ssmException(SsmException ex) {
        return new ResultVo(ex.getCode(), ex.getMessage(), null);
    }

}
